package com.mall.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;
import java.util.List;

/**
 * 角色实体类
 *
 * @author : liangY
 */
@JsonIgnoreProperties(value = {"handler"})
public class Role implements Serializable {

    /**
     * 角色编号
     */
    private Integer id;
    /**
     * 角色名称
     */
    private String role_name;
    /**
     * 角色描述
     */
    private String role_desc;

    /**
     * 多对多映射关系:一个角色对应多个权限
     */
    private List<Permission> permissions;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRole_name() {
        return role_name;
    }

    public void setRole_name(String role_name) {
        this.role_name = role_name;
    }

    public String getRole_desc() {
        return role_desc;
    }

    public void setRole_desc(String role_desc) {
        this.role_desc = role_desc;
    }

    public List<Permission> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<Permission> permissions) {
        this.permissions = permissions;
    }

    @Override
    public String toString() {
        return "Role{" +
                "id=" + id +
                ", role_name='" + role_name + '\'' +
                ", role_desc='" + role_desc + '\'' +
                ", permissions=" + permissions +
                '}';
    }
}
